﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using csplCalculatorLib.Model;
using csplCalculatorLib;

namespace csplCalculatorMain
{
    public class Program
    {
        public static void Main(string[] args)
        {
            MainCalculator calculator = new MainCalculator();
            CalModel data1 = new CalModel() {integervalue1 = 20, integervalue2  = 0,operation = CalOperations.Add};
            //CalModel data1 = new CalModel();
            //CalModel data2 = new CalModel(CalOperations.Div);
            //data1.listDataOfInteger = new List<int>(1,2,3,4,5,6,7,8,9,10);
            data1.integervalue1 = 20;
            data1.integervalue2 = 0;
            //data1.operation = CalOperations.Div;
            data1.operation = CalOperations.Add;
            data1.Mode = CalMode.Single;

            calculator.Data = data1;

            int result = 0;
            try
            {
                result = calculator.Calculate();
            }
            catch (Exception ex)
            {

                Console.WriteLine("An exception occured : ",ex.Message);
            }
        }
    }
}
